package com.ordertracker.persistent.dictionary.template;

import com.ordertracker.persistent.constant.ROLE_TYPE;
import com.ordertracker.persistent.dictionary.IRole;
import com.ordertracker.persistent.dictionary.template.OptimisticLockTemplate;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * Description of class.
 * Created 12/13/12 2:39 PM
 *
 * @author andrey.rodin@playtech.com
 */

@MappedSuperclass
@XmlRootElement
public abstract class AbstractRoleTemplate extends StateEntityTemplate implements IRole {

    @Column
    private String name;

    @Column
    private ROLE_TYPE roleType;

    protected AbstractRoleTemplate() {
    }

    protected AbstractRoleTemplate(String name, ROLE_TYPE roleType) {
        this.name = name;
        this.roleType = roleType;
    }

    @XmlElement(nillable = false)
    public String getName() {
        return name;
    }

    @XmlElement(nillable = false)
    public ROLE_TYPE getRoleType() {
        return roleType;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setRoleType(ROLE_TYPE roleType) {
        this.roleType = roleType;
    }
}
